<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze UI Admin index Examples</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="assets/js/echarts.min.js"></script>
    <link rel="stylesheet" href="assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="assets/css/app.css">
    <script src="assets/js/jquery.min.js"></script>
    <link rel="stylesheet" href="assets/css/com.css" />
    <link rel="stylesheet" href="assets/timepicker/bootstrap.min.css" />
    <link rel="stylesheet" href="assets/css/jstree/jstree-style.min.css" />
    <script src="layer/layer.js"></script>
    <style>
        .tpl-content-wrapper{
            margin-left: 0px;
        }
        body{
            overflow-y: scroll;
        }
    </style>
</head>

<body data-type="widgets">
    <script src="assets/js/theme.js"></script>
    <div class="am-g tpl-g">
       

        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">角色管理</div>


                            </div>
                            <div class="widget-body  am-fr">

                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button type="button" class="am-btn am-btn-default am-btn-primary" id="add-modal-toggle"><span class="am-icon-plus"></span> 新增</button>
                                                <button type="button" class="am-btn am-btn-default am-btn-success" id="delet_noes"><span class="am-icon-trash-o"></span> 删除</button>
                                                <button type="button" class="am-btn am-btn-default am-btn-primary"  id="bind_update"><span class="am-icon-repeat"></span> 更新</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                

                                <div class="am-u-sm-12"  style="height: 435px;">
                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black" id="example-r">
                                        <thead>
                                            <tr>
                                                <th style="width=10px;"><input style="display:inline;" type="checkbox" id="select_all"></th>
                                                <th>序号</th>
                                                <th>ID</th>
                                                <th>角色名</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="am-u-lg-12 am-cf">

                                    <div class="am-fr  paging_content">
                                        <div class="am-disabled li_bt bt_start"><a href="javascript:;">首页</a></div>
                                        <div class="am-disabled li_bt bt_left"><a href="javascript:;">«</a></div>
                                        <div class="content">
                                          <ul class="am-pagination tpl-pagination">
                                          </ul>
                                        </div>
                                        <div class="am-disabled li_bt bt_right"><a href="javascript:;">»</a></div>
                                        <div class="am-disabled li_bt bt_end"><a href="javascript:;">尾页</a></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 模态框 -->
        <!-- 新增模态弹窗 -->
        <div class="am-modal am-modal-prompt" tabindex="-1" id="add-modal">
          <div class="am-modal-dialog">
            <div class="am-modal-hd">
                <span class="modal-prompt-title">新增</span>
                <span data-am-modal-close class="am-close">&times;</span>
            </div>
            <div class="am-modal-bd modal-add">
              <div class="modal-category">
                  <span>ID</span>
                  <input type="text" class="am-modal-prompt-input" placeholder="ID" id="role_id" />
              </div>
              <div class="modal-category">
                  <span>角色名</span>
                  <input type="text" class="am-modal-prompt-input" placeholder="角色名" id="role_name" />
              </div>
              <div class="modal-category">
                  <span>权限</span>
                  <input type="text" class="am-modal-prompt-input" id="add_authorization" /><br />
                  <div id="modify_jstree"></div>
              </div>
            </div>
          <div class="am-modal-footer">
             <div class="modal-fotter-btn">
                 <button class="am-btn am-btn-primary" data-am-modal-confirm>确认</button>
                 <button class="am-btn am-btn-default" data-am-modal-cancel>取消</button>
             </div>   
              <!-- <span class="am-modal-btn" data-am-modal-cancel>取消</span>
              <span class="am-modal-btn" data-am-modal-confirm>提交</span> -->
          </div>
         </div>
        </div>

        


        <!-- 删除模态弹窗 -->
        <div class="am-modal am-modal-prompt modal-prompt-delete" tabindex="-1" id="delete-modal">
          <div class="am-modal-dialog">
            <div class="am-modal-hd">
                <span class="modal-prompt-title">信息</span>
                <span data-am-modal-close class="am-close">&times;</span>
            </div>
            <div class="am-modal-bd modal-delete">
              <div class="am-modal-content">
                  是否删除？
              </div>
            </div>
          <div class="am-modal-footer">
             <div class="modal-fotter-btn">
                 <button class="am-btn am-btn-primary" data-am-modal-confirm>确认</button>
                 <button class="am-btn am-btn-default" data-am-modal-cancel>取消</button>
             </div>
          </div>
         </div>
        </div>

        <!-- 修改密码模态弹窗 -->
        <div class="am-modal am-modal-prompt" tabindex="-1" id="modify-pw-modal">
          <div class="am-modal-dialog">
            <div class="am-modal-hd">
                <span class="modal-prompt-title">编辑</span>
                <span data-am-modal-close class="am-close">&times;</span>
            </div>
            <div class="am-modal-bd modal-add">
              <div class="modal-category">
                  <span>角色名</span>
                  <input type="text" class="am-modal-prompt-input" placeholder="角色名" id="modify_role_name" />
              </div>
              <div class="modal-category">
                  <span>权限</span>
                  <input type="text" class="am-modal-prompt-input" id="modify_authorization" /><br />
                  <div id="modify_jstree"></div>
              </div>
            </div>
          <div class="am-modal-footer">
             <div class="modal-fotter-btn">
                 <button class="am-btn am-btn-primary" id="pw-confirm" data-am-modal-confirm>确认</button>
                 <button class="am-btn am-btn-default" id="pw-cancel" data-am-modal-cancel>取消</button>
             </div>   
          </div>
         </div>
        </div>
    </div>
    <script src="assets/js/amazeui.min.js"></script>
    <script src="assets/js/amazeui.datatables.min.js"></script>
    <script src="assets/js/dataTables.responsive.min.js"></script>
    <script src="assets/js/app.js"></script>
    <script src="assets/js/jstree.min.js"></script>
    <script src="assets/js/indexjs/operators.js"></script>
    <script>
      var data = [
        {"id":1,name:"超级管理员","default":{"authorization":[100,300,400]}},
        {"id":2,name:"开发者","default":{"authorization":[300,400]}},
        {"id":3,name:"体验者","default":{"authorization":[100,400]}},
        {"id":4,name:"一般用户","default":{"authorization":[100,300,400]}},
        {"id":5,name:"超级VIP用户","default":{"authorization":[300,400]}},
        {"id":6,name:"超级管理员","default":{"authorization":[100,400,5001]}},
        {"id":7,name:"开发者","default":{"authorization":[100,300,400,5002]}},
        {"id":8,name:"体验者","default":{"authorization":[100,400]}},
        {"id":9,name:"一般用户","default":{"authorization":[300,400]}},
        {"id":10,name:"超级VIP用户","default":{"authorization":[100,300]}},
        {"id":11,name:"超级管理员","default":{"authorization":[100,300,400]}},
        {"id":12,name:"开发者","default":{"authorization":[100,300,400]}},
        {"id":13,name:"体验者","default":{"authorization":[100,300,400]}},
        {"id":14,name:"一般用户","default":{"authorization":[100,300,400]}},
        {"id":15,name:"超级VIP用户","default":{"authorization":[100,300,400]}},
        {"id":16,name:"超级管理员","default":{"authorization":[100,300,400]}},
        {"id":17,name:"开发者","default":{"authorization":[100,300,400]}},
        {"id":18,name:"体验者","default":{"authorization":[100,300,400]}},
        {"id":19,name:"一般用户","default":{"authorization":[100,300,400]}},
        {"id":20,name:"超级VIP用户","default":{"authorization":[100,300,400]}},
        {"id":21,name:"超级管理员","default":{"authorization":[100,300,400]}},
        {"id":22,name:"开发者","default":{"authorization":[100,300,400]}},
        {"id":23,name:"体验者","default":{"authorization":[100,300,400]}},
        {"id":24,name:"一般用户","default":{"authorization":[100,300,400]}},
        {"id":25,name:"超级VIP用户","default":{"authorization":[100,300,400]}},
        {"id":26,name:"超级管理员","default":{"authorization":[100,300,400]}},
        {"id":27,name:"开发者","default":{"authorization":[100,300,400]}},
      ];

      var treeData = [
          {
              "id":"100",
              "text":"操作员管理"
          },
          {
              "id":"200",
              "text":"服务器管理"
          },
          {
              "id":"300",
              "text":"用户管理",
              "state":{
                  "opened":true
              },
              "children":[
                  {
                      "id":"3001",
                      "text":"用户管理",
                  }
              ]
          },
          {
              "id":"400",
              "text":"产品管理"
          },
          {
              "id":"500",
              "text":"订单管理",
              "state":{
                  "opened":true
              },
              "children":[
                  {
                      "id":"5001",
                      "text":"订单记录"
                  },
                  {
                      "id":"5002",
                      "text":"支付记录"
                  }
              ]
          }
      ];
      $(function(){
        // console.log(operators);
        operators.init({
          data:data,
          el:"#example-r",
          delet_status:true,
          modify_status:true,
          jstree:true,
        });
      })


    </script>
</body>

</html>